import request from '@/utils/request'

// 查询资产报废审核列表
export function listScrapAudit(query) {
  return request({
    url: '/assets/scrapAudit/list',
    method: 'get',
    params: query
  })
}

// 查询资产报废审核详细
export function getScrapAudit(id) {
  return request({
    url: '/assets/scrapAudit/' + id,
    method: 'get'
  })
}

// 新增资产报废审核
export function addScrapAudit(data) {
  return request({
    url: '/assets/scrapAudit',
    method: 'post',
    data: data
  })
}

// 修改资产报废审核
export function updateScrapAudit(data) {
  return request({
    url: '/assets/scrapAudit',
    method: 'put',
    data: data
  })
}

// 删除资产报废审核
export function delScrapAudit(id) {
  return request({
    url: '/assets/scrapAudit/' + id,
    method: 'delete'
  })
}

// 审核通过资产报废申请
export function approveScrapRequest(data) {
  return request({
    url: '/assets/scrapAudit/approve',
    method: 'post',
    data: data
  })
}

// 审核拒绝资产报废申请
export function rejectScrapRequest(data) {
  return request({
    url: '/assets/scrapAudit/reject',
    method: 'post',
    data: data
  })
}
